package com.zr.dto;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @author: peterChen
 * @date: 2019/11/12 14:06
 * @description: com.zr.dto
 * @version: 1.0
 */

/**
 * 菜单
 */
public class MenuDTO {
    private Integer id;
    /**
     * 菜单名称
     */
    private String name;
    /**
     * 菜单对应url
     */
    private String url;
    /**
     * 菜单项所对应的路由路径
     */
    private String path;
    /**
     * 优先级（用于排序）
     */
    private Integer priority;
    private String description;
    /**
     * 角色集合
     */
    private Set<RoleDTO> roles = new HashSet<RoleDTO>(0);
    /**
     * 子菜单集合
     */
    private List<MenuDTO> children = new ArrayList<>();
    /**
     * 父菜单id
     */
    private Integer parentMenuId;

    public MenuDTO() {
    }

    public MenuDTO(Integer id, String name, String url, String path, Integer priority, String description, Set<RoleDTO> roles, List<MenuDTO> children, Integer parentMenuId) {
        this.id = id;
        this.name = name;
        this.url = url;
        this.path = path;
        this.priority = priority;
        this.description = description;
        this.roles = roles;
        this.children = children;
        this.parentMenuId = parentMenuId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Set<RoleDTO> getRoles() {
        return roles;
    }

    public void setRoles(Set<RoleDTO> roles) {
        this.roles = roles;
    }

    public List<MenuDTO> getChildren() {
        return children;
    }

    public void setChildren(List<MenuDTO> children) {
        this.children = children;
    }

    public Integer getParentMenuId() {
        return parentMenuId;
    }

    public void setParentMenuId(Integer parentMenuId) {
        this.parentMenuId = parentMenuId;
    }
}
